package com.zhiyizhen.handheld.common;

import android.app.Activity;
import android.content.DialogInterface;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;

import com.zhiyizhen.handheld.R;
import com.zhiyizhen.handheld.common.view.CommonDialog;

public class DialogUtil {

    public static void showModifyPasswordDialog(Activity activity) {
        View view = LayoutInflater.from(activity).inflate(R.layout.dialog_modify_password, (ViewGroup) activity.getWindow().getDecorView(), false);
        final EditText oldPasswordEdit = view.findViewById(R.id.oldPasswordEdit);
        final EditText newPasswordEdit = view.findViewById(R.id.newPasswordEdit);
        final EditText confirmPasswordEdit = view.findViewById(R.id.confirmPasswordEdit);

        CommonDialog.Builder builder = new CommonDialog.Builder(activity);
        builder.setView(view);

        builder.setCancelable(false);
        builder.show();
    }

}
